<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- 字段验证 -->
<s:if test="hasFieldErrors()">
    <script type="text/javascript">
        var msg = "";
        <s:iterator value="fieldErrors">
            <s:iterator value="value" status="statu">
                msg += '<s:property/></br>';
            </s:iterator>
        </s:iterator>
        parent.layer.alert(msg, {
            title: "提示信息",
            closeBtn: false
        });
    </script>
</s:if>


<!-- 错误是否成功 -->
<s:if test="hasActionMessages()">
    <s:if test="hasActionMessages()">
        <s:iterator value="actionMessages">
            <script type="text/javascript">
                parent.layer.alert("<s:property escape="false"/>", {
                    closeBtn: false
                }, function (index) {
                    parent.layer.close(index);
                    parent.refreshGrid('jgGrid');
                    var parent_index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(parent_index);
                })
            </script>
        </s:iterator>
    </s:if>
</s:if>